package com.mocha.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * 生命次过滤器后，要在Config配置类中 通过 FilterRegistrationBean 来添加过滤器 @See TestWebConfig.java
 */
public class TestFilterB implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("TestFilterB do init");

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("TestFilterB doFilter");

    }

    @Override
    public void destroy() {

        System.out.println("TestFilterB do destroy");

    }
}
